package com.sky.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("document_downloads")
public class DocumentDownload implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Integer id; // 记录ID

    @TableField("document_id")
    private Integer documentId; // 文档ID

    @TableField("user_id")
    private Integer userId; // 下载用户ID

    @TableField("user_type")
    private String userType; // 用户类型：student/merchant/admin

    @TableField("download_time")
    private LocalDateTime downloadTime; // 下载时间

    @TableField("ip_address")
    private String ipAddress; // IP地址
}